package com.fwixvye.service.impl;

import com.fwixvye.pojo.RelicsRandom;
import com.fwixvye.pojo.Result;
import com.fwixvye.service.RandomGenerationRelicsService;
import com.fwixvye.utils.PartGeneratorMethodUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.LinkedHashMap;

@Service
public class RandomGenerationRelicsServiceImpl implements RandomGenerationRelicsService {

    @Autowired
    PartGeneratorMethodUtil pgmu;

    @Override
    public Result conditionalGenerationOfRelics(String NUMposition, String mainTerm, Integer numberGenerated) {

        /*System.out.println(NUMposition);
        System.out.println(mainTerm);
        System.out.println(numberGenerated);*/


        switch (NUMposition) {
            case "随机": {
                ArrayList<RelicsRandom> list = new ArrayList<>();
                for (int i = 0; i < numberGenerated; i++) {
                    int nuMposition = pgmu.NUMposition();
                    String position = pgmu.position(nuMposition);
                    String mainTerm1 = pgmu.mainTerm(nuMposition);
                    String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                    double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                    ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                    RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                    list.add(relicsRandom);
                    //System.out.println(i+"\t");
                }
                return Result.success(list);
            }
            case "生之花": {
                ArrayList<RelicsRandom> list = new ArrayList<>();
                for (int i = 0; i < numberGenerated; i++) {
                    int nuMposition = 1;
                    String position = pgmu.position(nuMposition);
                    String mainTerm1 = pgmu.mainTerm(nuMposition);
                    String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                    double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                    ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                    RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                    list.add(relicsRandom);
                    //System.out.println(i+"\t");
                }
                return Result.success(list);
            }
            case "死之羽": {
                ArrayList<RelicsRandom> list = new ArrayList<>();
                for (int i = 0; i < numberGenerated; i++) {
                    int nuMposition = 2;
                    String position = pgmu.position(nuMposition);
                    String mainTerm1 = pgmu.mainTerm(nuMposition);
                    String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                    double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                    ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                    RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                    list.add(relicsRandom);
                    //System.out.println(i+"\t");
                }
                return Result.success(list);
            }
            case "时之沙": {
                switch (mainTerm) {
                    case "随机": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 3;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = pgmu.mainTerm(nuMposition);
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比生命值": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 3;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比生命值";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比攻击力": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 3;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比攻击力";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比防御力": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 3;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比防御力";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "元素精通": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 3;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "元素精通";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "元素充能效率": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 3;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "元素充能效率";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                }
                break;
            }
            case "空之杯": {
                switch (mainTerm) {
                    case "随机": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = pgmu.mainTerm(nuMposition);
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //                            System.out.print(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比生命值": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比生命值";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比攻击力": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比攻击力";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比防御力": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比防御力";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "元素精通": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "元素精通";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "火伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "火元素伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "水伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "水元素伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "风伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "风元素伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "雷伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "雷元素伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "草伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "草元素伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "冰伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "冰元素伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "岩伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "岩元素伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "物伤加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 4;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "物理伤害加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }

                }
                break;
            }
            case "理之冠": {
                switch (mainTerm) {
                    case "随机": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = pgmu.mainTerm(nuMposition);
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //                            System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比生命值": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比生命值";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比攻击力": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比攻击力";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "百分比防御力": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "百分比防御力";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "元素精通": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "元素精通";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "暴击率": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "暴击率";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "暴击伤害": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "暴击伤害";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                    case "治疗加成": {
                        ArrayList<RelicsRandom> list = new ArrayList<>();
                        for (int i = 0; i < numberGenerated; i++) {
                            int nuMposition = 5;
                            String position = pgmu.position(nuMposition);
                            String mainTerm1 = "治疗加成";
                            String[] strings = pgmu.FourSecondaryTrem(nuMposition, mainTerm1);
                            double[] doubles = pgmu.SecondaryEntryGear(nuMposition, mainTerm1, strings);
                            ArrayList<LinkedHashMap<String, Double>> arrayList = pgmu.LV20SecondaryEntryGear(strings, doubles);
                            RelicsRandom relicsRandom = new RelicsRandom(nuMposition, position, mainTerm1, strings, doubles, arrayList);
                            list.add(relicsRandom);
                            //System.out.println(i+"\t");
                        }
                        return Result.success(list);
                    }
                }
                break;
            }
        }

        return Result.err("前端参数错误");
    }
}
